use atlas
create table collector(
         Numbr varchar(4),
         npriem varchar(16),
         npered varchar(8),
         npromezh varchar(8),
         idclr varchar(4),
         idlc varchar(8),
         idaps varchar(14),
         aos varchar(15),
         aps varchar(15),
         aosr varchar(15),
         dbegin varchar(6),
         tbegin varchar(6),
         dtend varchar(12),
         vobr int,
         par1 varchar(10),
         par2 varchar(10),
         par3 varchar(10),
         par4 varchar(10),
         prinb int,
         peredb int,
         roctet varchar(4),
         rpacket varchar(4),
         vpacket varchar(4),
         pol1 varchar(3),
         pol2 varchar(3),
         pol3 varchar(2),
         pol4 varchar (2),
         pol5 varchar(4),
         pol6 varchar(4),
         pol7 varchar(2),
         pol8 varchar(2),
         pol9 varchar(2),
         pol10 varchar(2),
         pol11 varchar(26),
         pol12 varchar(4)
)
go
create table tarific_tmp(
         x_25aos varchar(8),
         x_25aps varchar(8),
         idlc varchar(8),
         aos varchar(15),
         aps varchar(15),
         nui varchar(15),
         dbegin smalldatetime,
         tbegin smalldatetime,
         dtend smalldatetime,
         vobr int,
         prinb int,
         peredb int,
         sek int,
         vb_c int, 
         err varchar(2),
         kod_err varchar(2)
)
go
create table x25_tmp(
         rez varchar(4),
         node varchar(3),
         lid varchar(3),
         dbegin varchar(8),
         tod varchar(6),
         gbl_tic varchar(3),
         total_rx_frames int,
         total_tx_frames int,
         accumulated_calls int,
         rx_bytes int,
         tx_bytes int,
         error int not null default(0)
)